package com.tang.controller;

import com.tang.sys.ResponseResult;
import com.tang.sys.entity.Article;
import com.tang.sys.service.IUploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class UploadController {

    @Autowired
    private IUploadService iUploadService;

    @PostMapping("/upload")
    public ResponseResult uploadImg(@RequestParam("img") MultipartFile multipartFile) {
        return iUploadService.uploadImg(multipartFile);
    }

}
